package method;

import java.util.ArrayList;

public class Demo003 {
    public static void main(String[] args) {
        //创建String的list
        ArrayList<String> list = new ArrayList<String>();
        list.add("haha");
        //调用泛型方法
        TestDemoMethod testDemoMethod = new TestDemoMethod();
        //相当于泛型传递了String类型,直接返回了String
        String value = testDemoMethod.getValue(list);
        //输出为"haha"
        System.out.println(value);
    }
}
